#include <QCoreApplication>
#include <iostream>
#include <cmath>
using namespace std;


int main(void)
{
    QCoreApplication a(argc, argv);
    {

        int N;

        double a,R1,R2,S;

        char key;

        cout << "(1,2,3,4) N=" ;
        cin >>N;
        cin.get(key);
        cout << "Z=" ;
        cin >>Z;
        cin.get(key)

        switch (N)

        {
        case 1:{ a=Z;
        R1=a*(sqrt(3.0)/6);
        R2=R1*2;
        S=a*a*(sqrt(3.0)/4);
        }
        break;

        case 2:{ a=Z/(sqrt(3.0)/6);
        R1=a*(sqrt(3.0)/6);
        R2=R1*2;
        S=a*a*(sqrt(3.0)/4);
        }
        break;

        case 3:{R2=Z;
        R1=R2/2;
        a=R1/(sqrt(3.0)/6);;
        S=a*a*(sqrt(3.0)/4);
        }
        break;

        case 4:{S=Z;
        a=sqrt(S/(sqrt(3.0)/4));
        R1=a*(sqrt(3.0)/6);
        R2=R1*2;
        }
        break;

        default :
        cout <<"Oshibka "<}

        cout <<"Otvet"<cout <<"a="<cout <<"R1="<cout <<"R2="<cout <<"S="<cout <<"Press key";

        cin.get(key);
        }

    }

    return a.exec();
}
